home *** CD-ROM | disk | FTP | other *** search
- // the declaration of class COMPONENT_LIST
- // Copyright (C) 1996, 1997 Kazutaka Hirata <khirata@jove.acs.unt.edu>
-
- #ifndef _COMPLIST_H_
- #define _COMPLIST_H_
-
- #include "../common/slist.h"
- #include "compelem.h"
-
- class COMPONENT_LIST : public extended_list<COMPONENT_ELEMENT> {
- public:
- // constructors
-
- COMPONENT_LIST() : extended_list<COMPONENT_ELEMENT>() {}
- COMPONENT_LIST(const COMPONENT_LIST& src) : extended_list<COMPONENT_ELEMENT>(src) {}
-
- // operators
-
- void operator+=(const COMPONENT_LIST& target);
- bool operator==(const COMPONENT_LIST& rval) {
- return false;
- }
-
- // max and min
-
- XY get_max() const;
- XY get_min() const;
-
- // block-related
-
- void shift(const XY& ac_dif, COMPONENT_LIST& target) const;
-
- void unselect();
- void select_items_in_block(const XY& ac1, const XY& ac2);
- void collect_selected_items(COMPONENT_LIST& dst) const;
- void remove_selected_items();
-
- // save and load
-
- int save(FILE_NEW& fp) const;
- private:
- typedef void (COMPONENT_LIST::*LOAD_FUNC)(FILE_NEW& fp);
- class LOAD_FUNC_INFO {
- public:
- uint version;
- LOAD_FUNC func;
- uint operator()() const { return version; }
- };
- static LOAD_FUNC_INFO load_func_table[];
- void load_200b18(FILE_NEW& fp);
- uint load_get_version(FILE_NEW& fp) const;
- LOAD_FUNC get_load_func(uint version) const;
- public:
- int load_170(FILE_NEW& fp);
- int load(FILE_NEW& fp);
-
- // miscellaneous
-
- public:
- void collect_aperture(APT_TABLE& apt_pin_table, APT_TABLE& apt_line_table) const;
- COMPONENT_ELEMENT* search(const XY& ac);
- COMPONENT_ELEMENT* search_designator(const char* designator);
-
- void rotate_90();
- void limit_drill_size(uint drill);
- };
-
- #endif /* _COMPLIST_H_ */
-